import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';
import 'package:wch/generated/json/base/json_field.dart';
import 'dart:convert';

import '../generated/json/dcotor.g.dart';

@JsonSerializable()
class DcotorModel extends ChangeNotifier{
	String? code;
	String? msg;
	DcotorModelData? data;

	DcotorModel();

	factory DcotorModel.fromJson(Map<String, dynamic> json) => $DcotorModelFromJson(json);

	Map<String, dynamic> toJson() => $DcotorModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}

}

@JsonSerializable()
class DcotorModelData implements ChangeNotifier{
	int? id;
	String? hospitalId;
	String? name;
	String? mobile;
	String? department;
	String? hospital;
	String? sex;

	DcotorModelData();

	factory DcotorModelData.fromJson(Map<String, dynamic> json) => $DcotorModelDataFromJson(json);

	Map<String, dynamic> toJson() => $DcotorModelDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}

  void updateData() {
    // TODO: implement notifyListeners
		notifyListeners();
  }

  @override
  void addListener(VoidCallback listener) {
    // TODO: implement addListener
  }

  @override
  void dispose() {
    // TODO: implement dispose
  }

  @override
  // TODO: implement hasListeners
  bool get hasListeners => throw UnimplementedError();

  @override
  void notifyListeners() {
    // TODO: implement notifyListeners
  }

  @override
  void removeListener(VoidCallback listener) {
    // TODO: implement removeListener
  }


}